<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><%@ page import="com.pignest.hotel.spring.Services" %><%@ page import="com.pignest.hotel.system.*" %><%@ page import="com.pignest.framework.util.Utils" %><%
String contextPath = request.getContextPath();
String url = Services.getCardService().getCardUrl(request);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>卡片管理</title>
<link type="text/css" rel="stylesheet" media="screen" href="<%=contextPath%>/css/jquery-ui.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="<%=contextPath%>/css/calendar.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="<%=contextPath%>/css/hotel.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="<%=contextPath%>/css/log.css"/>
<link type="text/css" rel="stylesheet" media="screen" href="<%=contextPath%>/css/flexigrid.css"/>
<script type="text/javascript" src="<%=contextPath%>/scripts/calendar/calendar.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/calendar/calendar-zh.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/calendar/calendar-setup.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/jquery-1.4.2.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/flexigrid.js"></script>
<script type="text/javascript" src="<%=contextPath%>/dwr/interface/CardAjax.js"></script>
<script type="text/javascript" src="<%=contextPath%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/context.jsp"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/card.js"></script>
<script type="text/javascript" src="<%=contextPath%>/scripts/card2.js"></script>
<style type="text/css">
#dialogs .dialog {
	display:none;
}
.form .input {
	width: 125px;
}
</style>
<script type="text/javascript">
window.contextPath = '<%=contextPath%>';
window.cardUrl = '<%=url%>';
$(function(){
	$("#cardType").val('${param.type}');
	$("#cardStatus").val('${param.status}');
});
</script>
<script type="text/javascript" src="<%=contextPath%>/scripts/card.js"></script>
</head>

<body>
<object id="bdLockCard" classid="clsid:130D6F39-2FE2-45FB-92B3-AE73D5B2B4EC"  width="0" height="0"></object>
<div id="wrapper" class="gtable">
  <div style="margin-top: 0px;" id="caption">
    <div class="bg">
      <h1>卡片管理</h1>
    </div>
  </div>
        <div id="content-wrapper">
            <div id="content">
                <div class="content">
                    <div id="tabs1" style="display: block;">
<form action="card.jsp" method="get">
	<table cellspacing="0" cellpadding="0">
		<tr class="odd">
			<td width="60px" align="right">类型</td>
			<td>
				<select id="cardType" name="type" style="width:125px;"">
					<option value="-1">-- 所有 --</option>
					<option value="0">普通卡</option>
					<option value="1">员工卡</option>
					<option value="2">会员卡</option>
				</select>
			</td>
			<td  width="60px" align="right">状态</td>
			<td>
				<select id="cardStatus" name="status" style="width:125px;">
					<option value="0">-- 所有 --</option>
					<option value="1">已启用</option>
					<option value="2">已禁用</option>
					<option value="3">已授权</option>
					<option value="4">未授权</option>
				</select>
			</td>
			<td width="60px" align="right">卡号</td>
			<td>
				<input name="cardNumber" type="text" value="${param.cardNumber}" style="width:120px;ime-mode:disabled;"/>
			</td>
			<td><input type="button" value="重置" onclick="javascript:resetForm()" style="padding:3px 10px;"/></td>
		</tr>
		<tr class="even">
			<td  width="60px" align="right">持用者</td>
			<td>
				<input type="text" value="${param.holderName}" name="holderName" style="width:120px" maxlength="82"/>
			</td>
			<td align="right">卡序列号</td>
			<td>
				<input type="text" value="${param.serialNumber}" name="serialNumber" style="width:120px;ime-mode:disabled;" maxlength="15"/>
				<input type="button" value="…" id="swingCard"/>
			</td>
			<td align="right">有效期</td>
			<td>
				<input type="text" value="${param.expireTime}" name="expireTime" id="expireTime" style="width:120px;ime-mode:disabled;" maxlength="15"/>
				<input type="button" id="btn_expire" value="…"/>
			</td>
			<td><input type="submit" value="查询" style="padding:3px 10px;"/></td>
		</tr>
	</table>
</form>
                    </div>
                    <div id="tabs2" style="display: block;">
                    		<table id="logTable" style="display:none"></table>
					</div>
			</div>
		</div>
	</div>
	<div id="footer">
		<jsp:include page="/modules/global/inc/footer.jsp"></jsp:include>
	</div>
</div>

<div id="dialogs">
	<div id="cardDialog" class="dialog">
		<ul class="form">
			<li><label>刷卡</label><input type="button" value="刷卡" class="input swingCard"/></li>
			<li><label>序列号</label><input class="serialNumber" type="text" readonly="readonly" class="input"/></li>
			<li>
				<label>卡号</label>
				<input type="text" class="cardNumber" class="input"/>
				<!-- <input class="save" type="button" value="写入卡号"/> -->
			</li>
		</ul>
		<div class="ui-widget" style="display:none;">
			<div class="ui-state-highlight ui-corner-all" style="padding: 0 0.1em;"> 
				<p style="margin-top:7px;margin-bottom:7px;"><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				<span class="result"></span></p> 
			</div>
		</div>
	</div>
	<div id="editCardDialog" class="dialog">
		<ul class="form left" style="float:left;width:180px;" title="卡片上的信息"></ul>
		<ul class="form right" style="float:left;width:180px;" title="服务器上的信息"></ul>
		<ul class="form edit" style="float:left;margin-left:-30px;" title="修改">
			<li>&nbsp;</li>
			<li>&nbsp;<input type="text" class="cardNumber" maxlength="10" class="input"/></li>
		</ul>
		<div class="ui-widget" style="display:none;clear:both;">
			<div class="ui-state-highlight ui-corner-all" style="padding: 0 0.1em;"> 
				<p style="margin-top:7px;margin-bottom:7px;"><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				<span class="result"></span></p> 
			</div>
		</div>
	</div>
	<div id="viewCardDialog" class="dialog">
		<ul class="form">
		</ul>
	</div>
	<div id="readCardDialog" class="dialog">
		<ul class="form left" style="float:left;width:180px;" title="卡片上的信息"></ul>
		<ul class="form right" style="float:left;width:180px;" title="服务器上的信息"></ul>
	</div>
	<div id="ecycleCardDialog" class="dialog">
		<ul class="form left" style="float:left;width:180px;" title="卡片上的信息"></ul>
		<ul class="form right" style="float:left;width:180px;" title="服务器上的信息"></ul>
		<div class="ui-widget" style="display:none;clear:both;">
			<div class="ui-state-highlight ui-corner-all" style="padding: 0 0.1em;"> 
				<p style="margin-top:7px;margin-bottom:7px;"><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				<span class="result"></span></p> 
			</div>
		</div>
	</div>
</div>
</body>
</html>
